local losezqSkill = fk.CreateSkill {
  name = "#losezqSkill",
  tags = { Skill.Compulsory, },
}


losezqSkill:addEffect(fk.TurnEnd, {
  can_refresh = function(self, event, target, player, data)
    return player:hasSkill(losezqSkill.name) and target == player and player:hasSkill("zhenqiao")
  end,
  on_refresh = function(self, event, target, player, data)
    local room = player.room
    local zhenqiaolv = player:getMark("@zhenqiaolv")
    if zhenqiaolv <= 0 then
      room:handleAddLoseSkills(player, "-zhenqiao|-"..losezqSkill.name, nil, false)
    else
      room:removePlayerMark(player,"@zhenqiaolv",1)
    end
  end,
})


return losezqSkill